<?php

use Illuminate\Routing\Router;

Admin::registerAuthRoutes();

Route::group([
    'prefix'        => config('admin.route.prefix'),
    'namespace'     => config('admin.route.namespace'),
    'middleware'    => config('admin.route.middleware'),
], function (Router $router) {

    $router->get('/', 'HomeController@index')->name('home');

	// 这句要在StoreController注册前，否则会被覆盖
	$router->get('/store/getAreaSelectData/{parentCode?}', 'StoreController@getAreaSelectData')->name('getAreaSelectData');
	// 这句要在MemberController注册前，否则会被覆盖
	Route::get('/member/chargeView', 'MemberController@chargeView')->name('chargeView');
	Route::get('/store/setMoreStoreLogin', 'StoreController@setMoreStoreLogin')->name('setMoreStoreLogin');//多店切换登录
	$router->get('/storeMemberCards/cardUseList', 'StoreMemberCardsController@cardUseList')->name('cardUseList');
	$router->get('/storeMemberCards/settleTip', 'StoreMemberCardsController@settleTip')->name('settleTip');
	
	$router->get('/activity/applyList', 'ActivityController@applyList')->name('applyList');
	
	$router->get('/myTrade', 'MyTradeController@applyList')->name('myTrade');
	
	$router->get('/distributionLevel/getDisCountList', 'DistributionLevelController@getDisCountList')->name('getDisCountList');
	
    $router->resources([
		'store' => StoreController::class,
		'member' => MemberController::class,
		'product' => ProductController::class,
        'inner-sales' => InnerSalesController::class,
		'assets' => AssetsController::class,
		'storegoodsin' => StoreGoodsInController::class,
		'storegoodsout' => StoreGoodsOutController::class,
		'storeParams' => StoreParamsController::class,
		'distributionPrecept' => DistributionPreceptController::class,
		'distributionGroup' => DistributionGroupController::class,
		'distributionLevel' => DistributionLevelController::class,
		'walletTrade' => WalletTradeController::class,
		'agencyLevel' => AgencyLevelController::class,
		'myTrade' => MyTradeController::class,
		'storeMemberCards' => StoreMemberCardsController::class,
		'distributionBill' => DistributionBillController::class,
		'shareBonus' => shareBonusController::class,
		
		'consult' => Record\ConsultController::class,
		'giftLog' => Record\GiftLogController::class,
		'memberTraining' => Record\MemberTrainingController::class,
		'nurse' => Record\NurseController::class,
		'tracking' => Record\TrackingController::class,
		'treatment' => Record\TreatmentController::class,
		
		'activity' =>ActivityController::class,
		'withdraw' =>MemberWithdrawController::class,
	]);
	
	
	// 获取日流水信息
	Route::get('/stats/getDayAccount', 'StatisticsController@getDayAccount')->name('getDayAccount');
	// 获取日售卡清单
	Route::get('/stats/getDayCard', 'StatisticsController@getDayCard')->name('getDayCard');
	// 获取日耗卡清单
	Route::get('/stats/getDayUseCard', 'StatisticsController@getDayUseCard')->name('getDayUseCard');
	// 获取新增会员
	Route::get('/stats/getDayAddMember', 'StatisticsController@getDayAddMember')->name('getDayAddMember');
	// 获取月流水信息
	Route::get('/stats/getMonthAccount', 'StatisticsController@getMonthAccount')->name('getMonthAccount');
	// 日充值记录
    Route::get('/stats/getDayRecharge', 'StatisticsController@getDayRecharge')->name('getDayRecharge');
    // 月充值记录
    Route::get('/stats/getMonthRecharge', 'StatisticsController@getMonthRecharge')->name('getMonthRecharge');
	// 每日支付方式总计
	Route::get('/stats/incomeTypeList', 'StatisticsController@incomeTypeList')->name('incomeTypeList');
	
	// 日历页面
	Route::get('/stats/showCalendar', 'StatisticsController@showCalendar')->name('showCalendar');
	// 获取月统计日历数据
	Route::get('/stats/getCalendarData', 'StatisticsController@getCalendarData')->name('getCalendarData');
	// 获取年分销统计
	Route::get('/stats/getDisStatsList', 'StatisticsController@getDisStatsList')->name('getDisStatsList');
	// 销售业绩
	Route::get('/stats/showPerformance', 'StatisticsController@showPerformance')->name('showPerformance');
	
});
